package com.youbar.client.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 配置拦截器
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {

    /**
     * token 拦截器
     * @return
     */
//    @Bean
//    LoginInterceptor loginInterceptor() {
//        return new LoginInterceptor();
//    }

    /**
     * 注册拦截器
     * @param registry
     */
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
//        registry.addInterceptor(loginInterceptor())
//                .addPathPatterns("/**") // 拦截所有的请求
//                .excludePathPatterns("/user/login");
    }
}
